package com.fate.feign;

import com.fate.domain.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "order-service")
public interface PayOrderFeign {
    /**
     * 根据订单号获取订单对象
     */
    @GetMapping("p/myOrder/getOrderByNum")
    Order getOrderByNum(@RequestParam String orderNum);

    /**
     * 修改订单状态 已经支付
     *
     * @param orderNum
     */
    @PostMapping("p/myOrder/changeOrderStatus")
    void changeOrderStatus(@RequestBody String orderNum);
}
